<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
      <title>GTL - Graph Template Library: bid_dijkstra.h Source File</title>
      <link href="doxygen.css" rel="stylesheet" type="text/css">
  </head>
  <body>
    <p class="links">  
      <a href="../index.html">Home</a> |
      Documentation |
      <a href="../register.html">Download</a> |
      <a href="../platforms.html">Platforms</a> |
      <a href="../refer.html">Projects</a> |      
      <a href="../lists.html">Mailing Lists</a> |
      <a href="../history.html">Version History</a>
    </p>

<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="classes.html"><span>Classes</span></a></li>
    <li class="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<h1>bid_dijkstra.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">//==========================================================================</span>
<a name="l00002"></a>00002 <span class="comment">//</span>
<a name="l00003"></a>00003 <span class="comment">//   bid_dijkstra.h</span>
<a name="l00004"></a>00004 <span class="comment">//</span>
<a name="l00005"></a>00005 <span class="comment">//==========================================================================</span>
<a name="l00006"></a>00006 <span class="comment">// $Id: bid_dijkstra.h,v 1.3 2003/03/24 15:58:54 raitner Exp $</span>
<a name="l00007"></a>00007 
<a name="l00008"></a>00008 <span class="preprocessor">#ifndef GTL_BID_DIJKSTRA_H</span>
<a name="l00009"></a>00009 <span class="preprocessor"></span><span class="preprocessor">#define GTL_BID_DIJKSTRA_H</span>
<a name="l00010"></a>00010 <span class="preprocessor"></span>
<a name="l00011"></a>00011 <span class="preprocessor">#include &lt;GTL/GTL.h&gt;</span>
<a name="l00012"></a>00012 <span class="preprocessor">#include &lt;GTL/graph.h&gt;</span>
<a name="l00013"></a>00013 <span class="preprocessor">#include &lt;GTL/node_map.h&gt;</span>
<a name="l00014"></a>00014 <span class="preprocessor">#include &lt;GTL/edge_map.h&gt;</span>
<a name="l00015"></a>00015 <span class="preprocessor">#include &lt;GTL/algorithm.h&gt;</span>
<a name="l00016"></a>00016 
<a name="l00017"></a>00017 __GTL_BEGIN_NAMESPACE
<a name="l00018"></a>00018 
<a name="l00035"></a><a class="code" href="a00005.html">00035</a> <span class="keyword">class </span>GTL_EXTERN <a class="code" href="a00005.html" title="Dijkstra&amp;#39;s Algorithm for computing a shortest path from a single source to a...">bid_dijkstra</a> : <span class="keyword">public</span> <a class="code" href="a00001.html" title="Abstract baseclass for all algoritm-classes.">algorithm</a>
<a name="l00036"></a>00036 {
<a name="l00037"></a>00037 <span class="keyword">public</span>:
<a name="l00041"></a><a class="code" href="a00005.html#da2e642d9f0582d30fe1dd51c4aa1899">00041</a>     <span class="keyword">typedef</span> list&lt;node&gt;::const_iterator shortest_path_node_iterator;
<a name="l00042"></a>00042 
<a name="l00046"></a><a class="code" href="a00005.html#703d0faf9568bc25a9305faa61412fe1">00046</a>     <span class="keyword">typedef</span> list&lt;edge&gt;::const_iterator shortest_path_edge_iterator;
<a name="l00047"></a>00047 
<a name="l00051"></a>00051     <span class="keyword">enum</span> node_color {white, grey, black};
<a name="l00052"></a>00052 
<a name="l00060"></a>00060     <a class="code" href="a00005.html" title="Dijkstra&amp;#39;s Algorithm for computing a shortest path from a single source to a...">bid_dijkstra</a>();
<a name="l00061"></a>00061 
<a name="l00067"></a>00067     <span class="keyword">virtual</span> ~<a class="code" href="a00005.html" title="Dijkstra&amp;#39;s Algorithm for computing a shortest path from a single source to a...">bid_dijkstra</a>();
<a name="l00068"></a>00068 
<a name="l00077"></a>00077     <span class="keywordtype">void</span> source_target(<span class="keyword">const</span> <a class="code" href="a00020.html" title="A node in a graph.">node</a>&amp; s, <span class="keyword">const</span> <a class="code" href="a00020.html" title="A node in a graph.">node</a>&amp; t);
<a name="l00078"></a>00078 
<a name="l00086"></a>00086     <span class="keywordtype">void</span> weights(<span class="keyword">const</span> <a class="code" href="a00011.html" title="A specialized map with edges as keys.">edge_map&lt;double&gt;</a>&amp; weight);
<a name="l00087"></a>00087     
<a name="l00099"></a>00099     <span class="keywordtype">void</span> store_path(<span class="keywordtype">bool</span> <span class="keyword">set</span>);
<a name="l00100"></a>00100 
<a name="l00119"></a>00119     <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a00001.html#76361fb03ad1cf643affc51821e43bed" title="Checks whether all preconditions are satisfied.">check</a>(<a class="code" href="a00014.html" title="A directed or undirected graph.">graph</a>&amp; G);
<a name="l00120"></a>00120             
<a name="l00135"></a>00135     <span class="keywordtype">int</span> <a class="code" href="a00001.html#734b189509a8d6b56b65f8ff772d43ca" title="Applies algorithm to graph g.">run</a>(<a class="code" href="a00014.html" title="A directed or undirected graph.">graph</a>&amp; G);
<a name="l00136"></a>00136 
<a name="l00142"></a>00142     <a class="code" href="a00020.html" title="A node in a graph.">node</a> source() <span class="keyword">const</span>;
<a name="l00143"></a>00143 
<a name="l00149"></a>00149     <a class="code" href="a00020.html" title="A node in a graph.">node</a> target() <span class="keyword">const</span>;
<a name="l00150"></a>00150 
<a name="l00158"></a>00158     <span class="keywordtype">bool</span> store_path() <span class="keyword">const</span>;
<a name="l00159"></a>00159 
<a name="l00165"></a>00165     <span class="keywordtype">bool</span> reached() <span class="keyword">const</span>;
<a name="l00166"></a>00166 
<a name="l00173"></a>00173     <span class="keywordtype">double</span> distance() <span class="keyword">const</span>;
<a name="l00174"></a>00174 
<a name="l00186"></a>00186     shortest_path_node_iterator shortest_path_nodes_begin();
<a name="l00187"></a>00187 
<a name="l00199"></a>00199     shortest_path_node_iterator shortest_path_nodes_end();
<a name="l00200"></a>00200 
<a name="l00212"></a>00212     shortest_path_edge_iterator shortest_path_edges_begin();
<a name="l00213"></a>00213 
<a name="l00225"></a>00225     shortest_path_edge_iterator shortest_path_edges_end();
<a name="l00226"></a>00226 
<a name="l00237"></a>00237     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00001.html#21aba63d066ae7897de6ca7d8425c408" title="Resets algorithm.">reset</a>();
<a name="l00238"></a>00238 <span class="keyword">private</span>:
<a name="l00245"></a>00245     <a class="code" href="a00020.html" title="A node in a graph.">node</a> s;
<a name="l00246"></a>00246 
<a name="l00253"></a>00253     <a class="code" href="a00020.html" title="A node in a graph.">node</a> t;
<a name="l00254"></a>00254 
<a name="l00261"></a>00261     <span class="keywordtype">bool</span> weights_set;
<a name="l00262"></a>00262 
<a name="l00269"></a>00269     <span class="keywordtype">bool</span> path_set;
<a name="l00270"></a>00270 
<a name="l00277"></a>00277     <a class="code" href="a00011.html" title="A specialized map with edges as keys.">edge_map&lt;double&gt;</a> weight;
<a name="l00278"></a>00278 
<a name="l00284"></a>00284     <span class="keywordtype">double</span> dist;
<a name="l00285"></a>00285 
<a name="l00291"></a>00291     <span class="keywordtype">bool</span> reached_t;
<a name="l00292"></a>00292 
<a name="l00298"></a>00298     <a class="code" href="a00021.html" title="A specialized map with nodes as keys.">node_map&lt;edge&gt;</a> pred;
<a name="l00299"></a>00299 
<a name="l00305"></a>00305     <a class="code" href="a00021.html" title="A specialized map with nodes as keys.">node_map&lt;edge&gt;</a> succ;
<a name="l00306"></a>00306 
<a name="l00312"></a>00312     <a class="code" href="a00021.html" title="A specialized map with nodes as keys.">node_map&lt;int&gt;</a> source_mark;
<a name="l00313"></a>00313 
<a name="l00319"></a>00319     <a class="code" href="a00021.html" title="A specialized map with nodes as keys.">node_map&lt;int&gt;</a> target_mark;
<a name="l00320"></a>00320 
<a name="l00326"></a>00326     <a class="code" href="a00021.html" title="A specialized map with nodes as keys.">node_map&lt;double&gt;</a> source_dist;
<a name="l00327"></a>00327 
<a name="l00333"></a>00333     <a class="code" href="a00021.html" title="A specialized map with nodes as keys.">node_map&lt;double&gt;</a> target_dist;
<a name="l00334"></a>00334 
<a name="l00344"></a>00344     list&lt;node&gt; shortest_path_node_list;
<a name="l00345"></a>00345 
<a name="l00355"></a>00355     list&lt;edge&gt; shortest_path_edge_list;
<a name="l00356"></a>00356 
<a name="l00361"></a>00361     <span class="keywordtype">void</span> reset_algorithm();
<a name="l00362"></a>00362     
<a name="l00367"></a>00367     <span class="keywordtype">void</span> init(<a class="code" href="a00014.html" title="A directed or undirected graph.">graph</a>&amp; G);
<a name="l00368"></a>00368 
<a name="l00377"></a>00377     <span class="keywordtype">void</span> fill_node_edge_lists(<span class="keyword">const</span> <a class="code" href="a00020.html" title="A node in a graph.">node</a>&amp; n);
<a name="l00378"></a>00378 };
<a name="l00379"></a>00379 
<a name="l00380"></a>00380 __GTL_END_NAMESPACE
<a name="l00381"></a>00381 
<a name="l00382"></a>00382 <span class="preprocessor">#endif // GTL_BID_DIJKSTRA_H</span>
<a name="l00383"></a>00383 <span class="preprocessor"></span>
<a name="l00384"></a>00384 <span class="comment">//--------------------------------------------------------------------------</span>
<a name="l00385"></a>00385 <span class="comment">//   end of file</span>
<a name="l00386"></a>00386 <span class="comment">//--------------------------------------------------------------------------</span>
</pre></div>    <p class="links">
      <a href="http://www.uni-passau.de/">University of Passau</a>
      &nbsp;-&nbsp;
      <a href="http://www.fmi.uni-passau.de/">FMI</a>
      &nbsp;-&nbsp;
      <a href="http://www.fmi.uni-passau.de/fmi/lehrstuehle/brandenburg/">Theoretical
	Computer Science</a>
    </p>
  <div class="copyright">
      Design &copy; 2002, 2003 <a href="mailto:raitner@fmi.uni-passau.de">Marcus Raitner</a>,  University of Passau 
  </div>
</body>
</html>
